package com.heima.dubbox.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.heima.dubbox.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Administrator
 * @version v1.0
 * @date 2019/6/24 0024 21:22
 * @description TODO
 **/

@Controller
@RequestMapping("/user")
public class UserController {

    @Reference
    private UserService userService;

    @RequestMapping("/showName")
    @ResponseBody
    public String showName(){

        return userService.getName();
    }
}
